﻿using System;
using Moq;

namespace mesan.crosscutting.testing
{
	public class BaseTest
	{
		// Known dates
		public DateTime Yesterday { get { return DateTime.Now.AddDays(-1); } }
		public DateTime Today { get { return DateTime.Now; } }
		public DateTime Tomorrow { get { return DateTime.Now.AddDays(1); } }

		// Known strings
		public string RandomString { get { return Guid.NewGuid().ToString(); } }
		public string EmptyString { get { return string.Empty; } }

		// Generic form of grabbing a MoQ mock
		public Mock<TInterface> GetMockFor<TInterface>(TInterface instance) where TInterface : class
		{
			return Mock.Get(instance);
		}
	}
}
